package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {
    
    /**
     * @description: 用户下单
     * @author: zhouzhijie
     * @date: 2023/11/22 19:00
     * @param: [ordersSubmitDTO]
     * @return: 
     **/
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);


    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * @description: 历史订单查询
     * @author: zhouzhijie
     * @date: 2023/11/24 23:13
     * @param: [page, pageSize, status]
     * @return: 
     **/
    PageResult historyOrders(int page, int pageSize, Integer status);

    /**
     * @description: 查询订单详情
     * @author: zhouzhijie
     * @date: 2023/11/25 17:34
     * @param: [id]
     * @return: 
     **/
    OrderVO orderDetail(Long id);

    /**
     * @description: 取消订单
     * @author: zhouzhijie
     * @date: 2023/11/25 21:57
     * @param: [id]
     * @return: 
     **/
    void cancelById(Long id) throws Exception;

    /**
     * @description: 再来一单
     * @author: zhouzhijie
     * @date: 2023/11/25 22:21
     * @param: [id]
     * @return: 
     **/
    void repetition(Long id);

    /**
     * @description: 订单搜索
     * @author: zhouzhijie
     * @date: 2023/11/26 9:06
     * @param: [ordersPageQueryDTO]
     * @return: 
     **/
    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    /**
     * @description: 各个状态的订单数量统计
     * @author: zhouzhijie
     * @date: 2023/11/26 12:17
     * @param: []
     * @return:
     **/
    OrderStatisticsVO statistics();


    /**
     * @description: 接单
     * @author: zhouzhijie
     * @date: 2023/11/26 16:43
     * @param: [ordersConfirmDTO]
     * @return: 
     **/
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * @description: 拒单
     * @author: zhouzhijie
     * @date: 2023/11/26 17:50
     * @param: [ordersRejectionDTO]
     * @return: 
     **/
    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    /**
     * @description: 取消订单
     * @author: zhouzhijie
     * @date: 2023/11/26 21:35
     * @param: [ordersCancelDTO]
     * @return: 
     **/
    void cancel(OrdersCancelDTO ordersCancelDTO) throws Exception;

    /**
     * @description: 派送订单
     * @author: zhouzhijie
     * @date: 2023/11/26 22:02
     * @param: [id]
     * @return: 
     **/
    void delivery(Long id);

    /**
     * @description: 完成订单
     * @author: zhouzhijie
     * @date: 2023/11/26 22:44
     * @param: [id]
     * @return: 
     **/
    void complete(Long id);

    /**
     * @description: 客户催单
     * @author: zhouzhijie
     * @date: 2023/11/27 16:35
     * @param: [id]
     * @return: 
     **/
    void reminder(Long id);
}
